home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gigarom 1
/
Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso
/
FILES
/
HYP
/
C-D
/
DeveloperStax.cpt
/
Developer Stack 1.0
/
card_16715.txt
< prev
next >
Wrap
Text File
|
1989-02-26
|
829b
|
37 lines
-- card: 16715 from stack: in.0
-- bmap block id: 0
-- flags: 4000
-- background id: 2202
-- name: VolumeName
-- part contents for background part 10
----- text -----
5
-- part contents for background part 2
----- text -----
--
-- VolumeName -- given a file pathname, return the name of the volume
-- it resides on. Straightforward string munging.
--
function VolumeName path
put empty into vol
repeat with i = 1 to the length of path
if character i of path is ":" then -- Stop at first colon
put ":" after vol
return vol
else
put character i of path after vol
end if
end repeat
-- If we reach here, there's something drastically wrong.
answer "Bad path given to VolumeName" with "OK"
return empty
end VolumeName
-- part contents for background part 3
----- text -----
VolumeName